Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/reuse 2.0 implementation #17

Merged
merged 23 commits into from
Aug 3, 2023
Merged

Conversation

klmcadams
Copy link
Contributor

Fixed add_license_header.py reuse implementation to run on reuse>=2, and adjusted unit tests to correspond with new add_license_header code.

Return codes:
0 - add_license_header passes (no files changed)
1 - add_license_header changed one or more files using reuse
2 - add_license_header cannot find .reuse directory in root of git repository, so reuse is not run on existing noncompliant files.

Closes #10 and #12.

@github-actions github-actions bot added maintenance Package and maintenance related bug Something isn't working labels Jul 28, 2023
@klmcadams klmcadams linked an issue Jul 28, 2023 that may be closed by this pull request
Copy link
Member

@RobPasMue RobPasMue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's talk about some of the changes here. Overall they look good, but the docstrings are totally off. Please align to numpydoc style.

src/ansys/pre_commit_hooks/add_license_headers.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 31, 2023
doc/source/conf.py Show resolved Hide resolved
src/ansys/pre_commit_hooks/add_license_headers.py Outdated Show resolved Hide resolved
src/ansys/pre_commit_hooks/add_license_headers.py Outdated Show resolved Hide resolved
@RobPasMue RobPasMue merged commit 4ef0021 into main Aug 3, 2023
26 checks passed
@RobPasMue RobPasMue deleted the fix/reuse-2.0-implementation branch August 3, 2023 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation maintenance Package and maintenance related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

run_reuse_cmd(file) enhancement Fix add-license-headers for reuse version >=2
2 participants